import Vue from 'vue'
import Router from 'vue-router'
import Login from './components/Login.vue'
import Home from './components/Home.vue'
import UserInfo from './components/UserInfo.vue'
import Chat from './components/communication/Chat.vue'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Login',
            component: Login,
            // hidden: true
        }, {
            path: '/home',
            name: 'Home',
            component: Home,
			children: [
				{
					path: '/userInfo',
					name: '个人中心',
					component: UserInfo
				},{
					path: '/chat',
					name: '通信',
					component: Chat
				}
			]
            // hidden: true,
            // meta: {
            //     roles: ['admin', 'user']
            // },
            // children: [
            //     {
            //         path: '/chat',
            //         name: '在线聊天',
            //         component: FriendChat,
            //         hidden: true
            //     }, {
            //         path: '/hrinfo',
            //         name: '个人中心',
            //         component: HrInfo,
            //         hidden: true
            //     }
            // ]
        }, {
            path: '*',
            redirect: '/home'
        }
    ]
})